/**
 * 询价.COM v1.0.0
 * http://xun-jia.com/
 *
 * Copyright (c) 2009 
 * 四川漾天空网络科技有限公司
 * 成都市天府软件园A3栋2楼
 *
 */
package com.xunjia.manage.action;

import org.apache.log4j.Logger;

import com.opensymphony.xwork2.Action;
import com.xunjia.action.XunJiaActionSupport;

/**
 * @author Mark
 * 
 * @Email Mark_yang@xun-jia.com
 * 
 * @Date 2009-4-14 上午11:02:24
 * 
 */
public class AdvertisementManageAction extends XunJiaActionSupport {
	// 序列码
	private static final long serialVersionUID = -1399816274713159887L;
	// 日志
	private static final Logger logger = Logger.getLogger(AdvertisementManageAction.class);
	// 广告ID
	private String advertisementID;

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.opensymphony.xwork2.ActionSupport#execute()
	 */
	@Override
	public String execute() throws Exception {
		logger.info(AdvertisementManageAction.class.getName());
		return Action.SUCCESS;
	}

	/**
	 * 停止播放关键字广告
	 * 
	 * @return
	 * @throws Exception
	 */
	public String stopPlayKeywords() throws Exception {
		logger.info("     stopPlayKeywords");
		addActionMessage(getText("advertisement.offline.keywords.success"));
		// addActionMessage("error");
		return Action.SUCCESS;
	}

	/**
	 * 停止播放超链接广告
	 * 
	 * @return
	 * @throws Exception
	 */
	public String stopPlayHyperlink() throws Exception {
		logger.info("stopPlayHyperlink");
		addActionMessage(getText("advertisement.offline.hyperlink.success"));
		return Action.SUCCESS;
	}

	/**
	 * 上线播放关键字广告
	 * 
	 * @return
	 * @throws Exception
	 */
	public String onlinePlayKeywords() throws Exception {
		logger.info(AdvertisementManageAction.class.getName());
		addActionMessage(getText("advertisement.online.keywords.success"));
		return Action.SUCCESS;
	}

	/**
	 * 上线播放超链接广告
	 * 
	 * @return
	 * @throws Exception
	 */
	public String onlinePlayHyperlink() throws Exception {
		logger.info(AdvertisementManageAction.class.getName());
		addActionMessage(getText("advertisement.online.hyperlink.success"));
		return Action.SUCCESS;
	}

	/**
	 * 删除关键字广告
	 * 
	 * @return
	 * @throws Exception
	 */
	public String deleteKeywords() throws Exception {
		logger.info("删除关键字广告");
		addActionMessage(getText("advertisement.delete.keywords.success"));
		return Action.SUCCESS;
	}

	/**
	 * 删除超链接广告
	 * 
	 * @return
	 * @throws Exception
	 */
	public String deleteHyperlink() throws Exception {
		logger.info("删除超链接广告");
		addActionMessage(getText("advertisement.delete.hyperlink.success"));
		return Action.SUCCESS;
	}

	/**
	 * @return the advertisementID
	 */
	public String getAdvertisementID() {
		return advertisementID;
	}

	/**
	 * @param advertisementID
	 *            the advertisementID to set
	 */
	public void setAdvertisementID(String advertisementID) {
		this.advertisementID = advertisementID;
	}

}
